
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>ST_Intersects · PostGIS中文指南</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="xxx">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-okaidia.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-folding-chapters/folding-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="SpatialRelationships.html" />
    
    

    <script src="../gitbook/gitbook-plugin-graph/d3.min.js"></script>
    <script src="../gitbook/gitbook-plugin-graph/function-plot.js"></script>    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        <li class="header">第 Ⅰ 部分：PostGIS基础</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    一 初识PostGIS
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../introduction/PostgisAbility.html">
            
                <a href="../introduction/PostgisAbility.html">
            
                    
                    1.1 PostGIS特性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../introduction/PostgisAbility.html">
            
                <a href="../introduction/PostgisAbility.html">
            
                    
                    1.2 PostGIS使用场景
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="../installation/PostgreSQL Installation.html">
            
                <a href="../installation/PostgreSQL Installation.html">
            
                    
                    1.2.1 适用场景
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="../installation/PostGIS Installation.html">
            
                <a href="../installation/PostGIS Installation.html">
            
                    
                    1.2.2 不适用场景
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../introduction/PostgisAbility.html">
            
                <a href="../introduction/PostgisAbility.html">
            
                    
                    1.3 PostGIS使用建议
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" >
            
                <span>
            
                    
                    1.4 PostGIS安装
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.4.1" data-path="../installation/PostgreSQL Installation.html">
            
                <a href="../installation/PostgreSQL Installation.html">
            
                    
                    1.4.1 PostgreSQL安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.2" data-path="../installation/PostGIS Installation.html">
            
                <a href="../installation/PostGIS Installation.html">
            
                    
                    1.4.2 PostGIS安装
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../introduction/ReleaseNotes.html">
            
                <a href="../introduction/ReleaseNotes.html">
            
                    
                    1.5 PostGIS重大版本
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    二 PostGIS入门
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" >
            
                <span>
            
                    
                    2.1 客户端介绍
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" >
            
                <span>
            
                    
                    2.1.1 psql
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.2" >
            
                <span>
            
                    
                    2.1.2 qgis
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" >
            
                <span>
            
                    
                    2.2 空间数据库
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" >
            
                <span>
            
                    
                    2.3 数据导入
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.3.1" >
            
                <span>
            
                    
                    2.3.1 shp
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.2" >
            
                <span>
            
                    
                    2.3.2 csv
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.3" >
            
                <span>
            
                    
                    2.3.3 excel
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">第 Ⅱ 部分：API手册</li>
        
        
    
        <li class="chapter " data-level="2.1" >
            
                <span>
            
                    
                    八 矢量函数
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" >
            
                <span>
            
                    
                    8.2 空间表管理
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1.1" data-path="TableManager/AddGeometryColumn.html">
            
                <a href="TableManager/AddGeometryColumn.html">
            
                    
                    8.2.1 AddGeometryColumn
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.1.2" data-path="TableManager/DropGeometryColumn.html">
            
                <a href="TableManager/DropGeometryColumn.html">
            
                    
                    8.2.2 DropGeometryColumn
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.1.3" data-path="TableManager/DropGeometryTable.html">
            
                <a href="TableManager/DropGeometryTable.html">
            
                    
                    8.2.3 DropGeometryTable
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.1.4" data-path="TableManager/Find_SRID.html">
            
                <a href="TableManager/Find_SRID.html">
            
                    
                    8.2.4 Find_SRID
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.1.5" data-path="TableManager/Populate_Geometry_Columns.html">
            
                <a href="TableManager/Populate_Geometry_Columns.html">
            
                    
                    8.2.5 Populate_Geometry_Columns
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.1.6" data-path="TableManager/UpdateGeometrySRID.html">
            
                <a href="TableManager/UpdateGeometrySRID.html">
            
                    
                    8.2.6 UpdateGeometrySRID
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.2" >
            
                <span>
            
                    
                    8.4 元数据读写
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.2.1" data-path="Accessors.html">
            
                <a href="Accessors.html#GeometryType">
            
                    
                    GeometryType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.2" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_GeometryType">
            
                    
                    ST_GeometryType
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.3" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_CoordDim">
            
                    
                    ST_CoordDim与ST_NDims
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.4" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_Dimension">
            
                    
                    ST_Dimension
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.5" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_Zmflag">
            
                    
                    ST_Zmflag
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.6" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_HasArc">
            
                    
                    ST_HasArc
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.7" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_IsPolygonCCW">
            
                    
                    ST_IsPolygonCCW
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.8" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_IsPolygonCW">
            
                    
                    ST_IsPolygonCW
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.9" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_IsClosed">
            
                    
                    ST_IsClosed
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.10" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_IsCollection">
            
                    
                    ST_IsCollection
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.11" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_IsEmpty">
            
                    
                    ST_IsEmpty
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.12" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_IsRing">
            
                    
                    ST_IsRing
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.13" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_IsSimple">
            
                    
                    ST_IsSimple
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.14" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_Boundary">
            
                    
                    ST_Boundary
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.15" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_Envelope">
            
                    
                    ST_Envelope
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.16" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_BoundingDiagonal">
            
                    
                    ST_BoundingDiagonal
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.17" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_X">
            
                    
                    ST_X,ST_Y,ST_Z,ST_M
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.18" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_StartPoint">
            
                    
                    ST_StartPoint,ST_EndPoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.19" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_NumGeometries">
            
                    
                    ST_NumGeometries,ST_GeometryN
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.20" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_NRings">
            
                    
                    ST_NRings,ST_ExteriorRing,ST_NumInteriorRings,ST_NumInteriorRing,ST_InteriorRingN
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.21" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_NumPatches">
            
                    
                    ST_NumPatches,ST_PatchN
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.22" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_NPoints">
            
                    
                    ST_NPoints,ST_NumPoints,ST_PointN,ST_Points
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.23" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_MemSize">
            
                    
                    ST_MemSize
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.24" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_Summary">
            
                    
                    ST_Summary
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2.25" data-path="Accessors.html">
            
                <a href="Accessors.html#ST_Dump">
            
                    
                    ST_Dump,ST_DumpPoints,ST_DumpRings
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.3" >
            
                <span>
            
                    
                    8.11 空间关系
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.3.1" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Intersects">
            
                    
                    ST_Intersects
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.2" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Intersects">
            
                    
                    ST_Disjoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.3" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Contains">
            
                    
                    ST_Contains
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.4" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Contains">
            
                    
                    ST_Within
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.5" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Equals">
            
                    
                    ST_Equals
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.6" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_ContainsProperly">
            
                    
                    ST_ContainsProperly
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.7" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Covers">
            
                    
                    ST_Covers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.8" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Covers">
            
                    
                    ST_CoveredBy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.9" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Overlaps">
            
                    
                    ST_Overlaps
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.10" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Overlaps">
            
                    
                    ST_Crosses
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.11" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Touches">
            
                    
                    ST_Touches
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.12" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_Relate">
            
                    
                    ST_Relate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.13" data-path="SpatialRelationships.html">
            
                <a href="SpatialRelationships.html#ST_RelateMatch">
            
                    
                    ST_RelateMatch
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.4" >
            
                <span>
            
                    
                    8.12 空间测量
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.4.1" data-path="Measurement/ST_3DClosestPoint.html">
            
                <a href="Measurement/ST_3DClosestPoint.html#ST_3DClosestPoint">
            
                    
                    ST_3DClosestPoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.2" data-path="Measurement/ST_3DDistance.html">
            
                <a href="Measurement/ST_3DDistance.html">
            
                    
                    ST_3DDistance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.3" data-path="Measurement/ST_Angle.html">
            
                <a href="Measurement/ST_Angle.html">
            
                    
                    ST_Angle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.4" data-path="Measurement/ST_Area.html">
            
                <a href="Measurement/ST_Area.html">
            
                    
                    ST_Area
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.5" data-path="Measurement/ST_Azimuth.html">
            
                <a href="Measurement/ST_Azimuth.html">
            
                    
                    ST_Azimuth
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.6" data-path="Measurement/ST_ClosestPoint.html">
            
                <a href="Measurement/ST_ClosestPoint.html">
            
                    
                    ST_ClosestPoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.7" data-path="Measurement/ST_Distance.html">
            
                <a href="Measurement/ST_Distance.html">
            
                    
                    ST_Distance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.8" data-path="Measurement/ST_Project.html">
            
                <a href="Measurement/ST_Project.html">
            
                    
                    ST_Project
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.5" >
            
                <span>
            
                    
                    8.14 仿射变换
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.5.1" data-path="AffineTransformations/ST_Affine.html">
            
                <a href="AffineTransformations/ST_Affine.html#ST_Affine">
            
                    
                    ST_Affine
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5.2" data-path="AffineTransformations/ST_Rotate.html">
            
                <a href="AffineTransformations/ST_Rotate.html">
            
                    
                    ST_Rotate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5.3" data-path="AffineTransformations/ST_RotateX.html">
            
                <a href="AffineTransformations/ST_RotateX.html">
            
                    
                    ST_RotateX
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5.4" data-path="AffineTransformations/ST_RotateY.html">
            
                <a href="AffineTransformations/ST_RotateY.html">
            
                    
                    ST_RotateY
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5.5" data-path="AffineTransformations/ST_RotateZ.html">
            
                <a href="AffineTransformations/ST_RotateZ.html">
            
                    
                    ST_RotateZ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5.6" data-path="AffineTransformations/ST_Scale.html">
            
                <a href="AffineTransformations/ST_Scale.html">
            
                    
                    ST_Scale
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5.7" data-path="AffineTransformations/ST_Translate.html">
            
                <a href="AffineTransformations/ST_Translate.html">
            
                    
                    ST_Translate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5.8" data-path="AffineTransformations/ST_TransScale.html">
            
                <a href="AffineTransformations/ST_TransScale.html">
            
                    
                    ST_TransScale
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.6" >
            
                <span>
            
                    
                    8.15 空间聚类
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.6.1" data-path="Clustering.html">
            
                <a href="Clustering.html#ST_ClusterDBSCAN">
            
                    
                    ST_ClusterDBSCAN
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6.2" data-path="Clustering.html">
            
                <a href="Clustering.html#ST_ClusterIntersecting">
            
                    
                    ST_ClusterIntersecting
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6.3" data-path="Clustering.html">
            
                <a href="Clustering.html#ST_ClusterKMeans">
            
                    
                    ST_ClusterKMeans
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6.4" data-path="Clustering.html">
            
                <a href="Clustering.html#ST_ClusterWithin">
            
                    
                    ST_ClusterWithin
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.7" >
            
                <span>
            
                    
                    8.16 线性参考
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.7.1" data-path="LinearReferencing/ST_LineInterpolatePoint.html">
            
                <a href="LinearReferencing/ST_LineInterpolatePoint.html">
            
                    
                    ST_LineInterpolatePoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.2" data-path="LinearReferencing/ST_3dLineInterpolatePoint.html">
            
                <a href="LinearReferencing/ST_3dLineInterpolatePoint.html">
            
                    
                    ST_3dLineInterpolatePoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.3" data-path="LinearReferencing/ST_LineInterpolatePoints.html">
            
                <a href="LinearReferencing/ST_LineInterpolatePoints.html">
            
                    
                    ST_LineInterpolatePoints
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.4" data-path="LinearReferencing/ST_LineLocatePoint.html">
            
                <a href="LinearReferencing/ST_LineLocatePoint.html">
            
                    
                    ST_LineLocatePoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.5" data-path="LinearReferencing/ST_LineSubstring.html">
            
                <a href="LinearReferencing/ST_LineSubstring.html">
            
                    
                    ST_LineSubstring
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.6" data-path="LinearReferencing/ST_LocateAlong.html">
            
                <a href="LinearReferencing/ST_LocateAlong.html">
            
                    
                    ST_LocateAlong
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.7" data-path="LinearReferencing/ST_LocateBetween.html">
            
                <a href="LinearReferencing/ST_LocateBetween.html">
            
                    
                    ST_LocateBetween
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.8" data-path="LinearReferencing/ST_LocateBetweenElevations.html">
            
                <a href="LinearReferencing/ST_LocateBetweenElevations.html">
            
                    
                    ST_LocateBetweenElevations
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.9" data-path="LinearReferencing/ST_InterpolatePoint.html">
            
                <a href="LinearReferencing/ST_InterpolatePoint.html">
            
                    
                    ST_InterpolatePoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.10" data-path="LinearReferencing/ST_AddMeasure.html">
            
                <a href="LinearReferencing/ST_AddMeasure.html">
            
                    
                    ST_AddMeasure
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7.11" data-path="LinearReferencing/examples.html">
            
                <a href="LinearReferencing/examples.html">
            
                    
                    综合案例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">第 Ⅲ 部分：PostGIS++</li>
        
        
    

    
        
        <li class="header">第 Ⅳ 部分：常见问题</li>
        
        
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >ST_Intersects</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x62D3;&#x6251;&#x5173;&#x7CFB;">&#x62D3;&#x6251;&#x5173;&#x7CFB;</h2>
<h3 id="stintersectsstdisjoint"><span id="ST_Intersects">ST_Intersects,ST_Disjoint</span></h3>
<p>&#x4F5C;&#x7528;&#xFF1A;ST_Intersects&#x5224;&#x65AD;&#x4E24;&#x4E2A;Geometry/Geography&#x662F;&#x5426;&#x76F8;&#x4EA4;&#xFF0C;ST_Disjoint&#x5224;&#x65AD;&#x4E24;&#x4E2A;Geometry&#x662F;&#x5426;&#x76F8;&#x79BB;&#xFF0C;&#x4E0D;&#x652F;&#x6301;Geography&#x7C7B;&#x578B;&#x3002;</p>
<p>&#x91CD;&#x70B9;&#xFF1A;</p>
<ul>
<li><strong>&#x4EC5;&#x7528;&#x4E8E;&#x4E8C;&#x7EF4;&#x6570;&#x636E;&#x3002;</strong></li>
<li><strong>ST_Intersects&#x5728;PostGIS&#x7A7A;&#x95F4;&#x5173;&#x7CFB;&#x4E2D;&#x662F;&#x6700;&#x91CD;&#x8981;&#x6700;&#x5E38;&#x7528;&#x7684;&#x51FD;&#x6570;&#x3002;</strong></li>
<li><strong>&#x7A7A;&#x95F4;&#x5173;&#x7CFB;&#x5F88;&#x5C11;&#x7528;&#x4E8E;&#x5224;&#x5B9A;&#x4E24;&#x4E2A;&#x56FE;&#x5F62;&#x5177;&#x4F53;&#x5173;&#x7CFB;&#xFF0C;&#x8FD9;&#x6CA1;&#x610F;&#x4E49;&#x5176;&#x5B9E;&#xFF0C;&#x800C;&#x662F;&#x7ED3;&#x5408;gist&#x7D22;&#x5F15;&#x4F5C;&#x4E3A;&#x68C0;&#x7D22;&#x8868;&#x8FBE;&#x5F0F;&#x4ECE;&#x7A7A;&#x95F4;&#x8868;&#x4E2D;&#x67E5;&#x8BE2;&#x6570;&#x636E;&#x4F7F;&#x7528;&#x3002;</strong></li>
<li><strong>ST_Intersects&#x53EF;&#x80FD;&#x4F1A;&#x8D70;&#x7A7A;&#x95F4;&#x7D22;&#x5F15;&#xFF0C;ST_Disjoint&#x4E00;&#x5B9A;&#x4E0D;&#x4F1A;&#x8D70;&#x7A7A;&#x95F4;&#x7D22;&#x5F15;&#xFF0C;ST_Disjoint&#x7EDD;&#x5BF9;&#x4E0D;&#x8981;&#x7528;&#x4E8E;&#x505A;&#x7A7A;&#x95F4;&#x68C0;&#x7D22;&#x3002;</strong></li>
</ul>
<p>&#x7CBE;&#x5EA6;&#xFF1A;&#x5BF9;&#x4E8E;&#x56FE;&#x5F62;&#x4E3A;Geography&#x7C7B;&#x578B;&#xFF0C;&#x5BB9;&#x5DEE;&#x7CBE;&#x5EA6;&#x5230;0.00001&#x7C73;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x4E24;&#x4E2A;&#x56FE;&#x5F62;&#x8DDD;&#x79BB;&#x5C0F;&#x4E8E;0.00001&#x5C31;&#x4F1A;&#x88AB;&#x8BA4;&#x4E3A;&#x662F;&#x76F8;&#x4EA4;&#x3002;</p>
<p>ST_Intersects&#x662F;&#x4E2A;&#x7C97;&#x7C92;&#x5EA6;&#x7684;&#x7A7A;&#x95F4;&#x5173;&#x7CFB;&#xFF0C;&#x8BA4;&#x5B9A;&#x4E24;&#x4E2A;&#x56FE;&#x5F62;&#x5B58;&#x5728;&#x4EA4;&#x96C6;&#xFF0C;&#x4F46;&#x5728;&#x4E0D;&#x540C;&#x7684;&#x5E94;&#x7528;&#x573A;&#x666F;&#x4E0B;&#xFF0C;&#x6709;&#x65F6;&#x9700;&#x8981;&#x66F4;&#x7CBE;&#x786E;&#x7684;&#x7A7A;&#x95F4;&#x5173;&#x7CFB;&#xFF0C;&#x5982;geomA&#x5305;&#x542B;geomB&#x7B49;&#xFF0C;&#x56E0;&#x6B64;ST_Intersects&#x53EF;&#x4EE5;&#x7EC6;&#x5206;&#x4E3A;&#x5982;&#x4E0B;&#x66F4;&#x5177;&#x4F53;&#x7684;&#x7A7A;&#x95F4;&#x5173;&#x7CFB;&#xFF1A;ST_Contains&#xFF08;&#x5305;&#x542B;&#xFF09;,ST_Within&#xFF08;&#x88AB;&#x5305;&#x542B;&#xFF09;,ST_Equals&#xFF08;&#x5B8C;&#x5168;&#x76F8;&#x7B49;&#xFF09;&#xFF0C;ST_Crosses&#xFF08;&#x7A7F;&#x8D8A;&#xFF09;&#xFF0C; ST_Covers&#xFF08;&#x8986;&#x76D6;&#xFF09;,ST_Overlaps&#xFF08;&#x538B;&#x76D6;&#xFF09;&#xFF0C;ST_Touches&#xFF08;&#x76F8;&#x8FDE;&#xFF09;&#xFF0C;&#x8FD9;&#x4E9B;&#x51FD;&#x6570;&#x5176;&#x5B9E;&#x90FD;&#x9690;&#x542B;&#x4E86;&#x4ED6;&#x4EEC;&#x4E00;&#x5B9A;&#x662F;&#x76F8;&#x4EA4;&#x7684;&#x3002;</p>
<h5 id="api&#x4F7F;&#x7528;&#x793A;&#x4F8B;">API&#x4F7F;&#x7528;&#x793A;&#x4F8B;</h5>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Intersestc1.png" alt=""></p>
<pre class="language-"><code>--ST_Intersects geometry
SELECT ST_Intersects(ST_GeomFromText(&apos;POINT(0 0)&apos;,4326), ST_GeomFromText(&apos;LINESTRING (2 0, 0 2)&apos;,4326));
st_intersects
---------------
   flase

SELECT ST_Intersects(ST_GeomFromText(&apos;POINT(1 1)&apos;,4326), ST_GeomFromText(&apos;LINESTRING (2 0, 0 2)&apos;,4326));
st_intersects
---------------
   true

--ST_Intersects geography
SELECT ST_Intersects(ST_GeomFromText(&apos;POINT(0 0)&apos;,4326)::geography, ST_GeomFromText(&apos;LINESTRING (2 0, 0 2)&apos;,4326)::geography);
  st_intersects
---------------
   flase 

--ST_Disjoint geometry
SELECT ST_Disjoint(ST_GeomFromText(&apos;POINT(0 0)&apos;,4326), ST_GeomFromText(&apos;LINESTRING (2 0, 0 2)&apos;,4326));
  st_disjoint
---------------
    true   

SELECT ST_Disjoint(ST_GeomFromText(&apos;POINT(0 0)&apos;,4326)::geography, ST_GeomFromText(&apos;LINESTRING (2 0, 0 2)&apos;,4326)::geography);
ERROR:  &#x9519;&#x8BEF;:  &#x51FD;&#x6570; st_disjoint(geography, geography) &#x4E0D;&#x5B58;&#x5728;
</code></pre><p><strong>&#x7ED3;&#x8BBA;&#xFF1A;ST_Disjoint&#x4E0D;&#x652F;&#x6301;geography&#x3002;</strong></p>
<h3 id="stcontainsstwithin"><span id="ST_Contains">ST_Contains,ST_Within</span></h3>
<p><strong>&#x524D;&#x63D0;&#xFF1A;&#x90FD;&#x53EA;&#x652F;&#x6301;geometry&#xFF0C;&#x4E0D;&#x652F;&#x6301;geography&#x3002;</strong></p>
<p>&#x5B9A;&#x4E49;&#xFF1A;</p>
<ul>
<li>ST_Contains(A,B)&#xFF1A;&#x5F53;&#x4E14;&#x4EC5;&#x5F53;B&#x7684;&#x70B9;&#x4E0D;&#x4F4D;&#x4E8E;A&#x7684;&#x5916;&#x90E8;&#x4E14;B&#x7684;&#x5185;&#x90E8;&#x7684;&#x81F3;&#x5C11;&#x4E00;&#x4E2A;&#x70B9;&#x4F4D;&#x4E8E;A&#x7684;&#x5185;&#x90E8;&#x65F6;&#xFF0C;&#x624D;&#x8FD4;&#x56DE;true&#x3002;</li>
<li>ST_Within(A,B)&#xFF1A;&#x51E0;&#x4F55;A&#x5B8C;&#x5168;&#x5728;&#x51E0;&#x4F55;B&#x5185;&#x3002;&#x4E0E;ST_Contains&#x5173;&#x7CFB;&#x76F8;&#x53CD;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;ST_Contains(A,B)=true&#x5219;&#x610F;&#x5473;&#x7740;ST_Within(B,A)=true&#x3002;</li>
</ul>
<h5 id="api&#x4F7F;&#x7528;&#x793A;&#x4F8B;">API&#x4F7F;&#x7528;&#x793A;&#x4F8B;</h5>
<p>ST_Contains(A,B)&#xFF1A;</p>
<p>&#x70B9;&#x5305;&#x542B;&#x70B9;&#xFF1A;</p>
<pre class="language-"><code>--A&#x5305;&#x542B;B
--A=Point(0 2) B=Point(0 2)
select ST_Contains(ST_GeomFromText(&apos;Point(0 2)&apos;,4326),ST_GeomFromText(&apos;Point(0 2)&apos;,4326));
  ST_Contains
---------------
    true
</code></pre><p><strong>&#x5224;&#x65AD;&#x4F9D;&#x636E;&#xFF1A;B&#x70B9;&#x5750;&#x6807;&#x4E0D;&#x4F4D;&#x4E8E;A&#x70B9;&#x5916;&#x90E8;&#xFF0C; &#x7531;&#x4E8E;A&#x70B9;&#x8303;&#x56F4;&#x662F;&#x4E2A;&#x70B9;&#x57DF;&#xFF0C;B&#x70B9;&#x843D;&#x5728;&#x4E86;A&#x7684;&#x70B9;&#x57DF;&#x8303;&#x56F4;&#x5185;&#xFF08;B&#x70B9;&#x81F3;&#x5C11;&#x6709;&#x4E00;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#xFF09;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;A&#x70B9;&#x662F;&#x5305;&#x542B;B&#x70B9;&#x7684;&#x3002;</strong></p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Contains2.png" alt=""></p>
<p>&#x7EBF;&#x5305;&#x542B;&#x70B9;&#xFF1A;</p>
<pre class="language-"><code>--A&#x7EBF; B&#x70B9;
select ST_Contains(ST_GeomFromText(&apos;LineString(0 0,0 5)&apos;,4326),ST_GeomFromText(&apos;Point(0 2)&apos;,4326));
  ST_Contains
---------------
    true
</code></pre><p><strong>&#x5224;&#x65AD;&#x4F9D;&#x636E;&#xFF1A;B&#x70B9;&#x5750;&#x6807;&#x4E0D;&#x4F4D;&#x4E8E;A&#x7EBF;&#x5916;&#x90E8;&#xFF0C; &#x7531;&#x4E8E;A&#x7EBF;&#x8303;&#x56F4;&#x662F;&#x4E2A;&#x7EBF;&#x57DF;&#xFF0C;B&#x70B9;&#x843D;&#x5728;&#x4E86;A&#x7684;&#x7EBF;&#x57DF;&#x8303;&#x56F4;&#x5185;&#xFF08;B&#x70B9;&#x81F3;&#x5C11;&#x6709;&#x4E00;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#xFF09;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;A&#x7EBF;&#x662F;&#x5305;&#x542B;B&#x70B9;&#x7684;&#x3002;</strong></p>
<p>&#x9762;&#x5305;&#x542B;&#x7EBF;&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Contains1.png" alt=""></p>
<pre class="language-"><code>--A&#x9762; B&#x7EBF;
select ST_Contains(ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326),ST_GeomFromText(&apos;LineString(1 1,3 3)&apos;,4326));
  ST_Contains
---------------
    true
</code></pre><p><strong>&#x5224;&#x65AD;&#x4F9D;&#x636E;&#xFF1A;B&#x7EBF;&#x5750;&#x6807;&#x4E0D;&#x4F4D;&#x4E8E;A&#x9762;&#x5916;&#x90E8;&#xFF0C; &#x7531;&#x4E8E;A&#x9762;&#x8303;&#x56F4;&#x662F;&#x4E2A;&#x9762;&#x57DF;&#xFF0C;B&#x7EBF;&#x843D;&#x5728;&#x4E86;A&#x7684;&#x9762;&#x57DF;&#x8303;&#x56F4;&#x5185;&#xFF08;B&#x7EBF;&#x81F3;&#x5C11;&#x6709;&#x4E00;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#xFF09;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;A&#x9762;&#x662F;&#x5305;&#x542B;B&#x7EBF;&#x7684;&#x3002;</strong></p>
<p>&#x8BF4;&#x660E;&#xFF1A;&#x5728;&#x5224;&#x65AD;&#x4F9D;&#x636E;&#x4E2D;&#xFF0C;&#x53CD;&#x590D;&#x5F3A;&#x8C03;B&#x4E0D;&#x4F4D;&#x4E8E;A&#x5916;&#x90E8;&#xFF0C;&#x4E14;&#x5F15;&#x5165;&#x70B9;&#x57DF;&#x7EBF;&#x57DF;&#x9762;&#x57DF;&#x6982;&#x5FF5;&#xFF0C;&#x5C31;&#x662F;&#x4E3A;&#x4E86;&#x628A;A&#x5F53;&#x505A;&#x4E00;&#x4E2A;&#x201C;<strong>&#x7C7B;&#x4F3C;&#x9762;</strong>&#x201D;&#x7684;&#x6982;&#x5FF5;&#xFF0C;&#x53EA;&#x6709;&#x8FD9;&#x6837;&#xFF0C;B&#x4E2D;&#x81F3;&#x5C11;&#x4E00;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#x8FD9;&#x4E2A;&#x5B9A;&#x4E49;&#x624D;&#x6BD4;&#x8F83;&#x597D;&#x7406;&#x89E3;&#x3002;</p>
<p>==&#x6CE8;&#x610F;&#xFF1A;ST_Contains(A,B)&#x4E00;&#x5B9A;&#x4F1A;ST_Within(B,A)&#x3002;==</p>
<pre class="language-"><code>select ST_Contains(A,B),ST_Within(B,A) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;LineString(1 1,3 3)&apos;,4326) As B) as test_data;
  ST_Contains  |   ST_Within
--------------------------------------
    true       |     true
</code></pre><p>&#x5982;&#x679C;B&#x4E2D;&#x4E0D;&#x4F4D;&#x4E8E;A&#x5916;&#x90E8;&#xFF0C;&#x4F46;&#x662F;&#x4E0D;&#x5F3A;&#x8C03;B&#x4E2D;&#x81F3;&#x5C11;&#x4E00;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#x4F1A;&#x662F;&#x4EC0;&#x4E48;&#x7ED3;&#x679C;&#xFF1F;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Contains3.png" alt=""></p>
<pre class="language-"><code>select st_contains(st_geomfromtext(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326),st_geomfromtext(&apos;LineString(0 0,0 5)&apos;,4326));
  ST_Contains
---------------
    false
</code></pre><p><strong>&#x5224;&#x65AD;&#x4F9D;&#x636E;&#xFF1A;B&#x7EBF;&#x5750;&#x6807;&#x4E0D;&#x4F4D;&#x4E8E;A&#x9762;&#x5916;&#x90E8;&#xFF0C; &#x4F46;B&#x7EBF;&#x6240;&#x6709;&#x5750;&#x6807;&#x90FD;&#x5728;A&#x9762;&#x7684;&#x8FB9;&#x754C;&#x4E0A;&#xFF0C;&#x90A3;&#x4E48;B&#x7EBF;&#x6CA1;&#x6709;&#x4EFB;&#x4F55;&#x70B9;&#x5728;A&#x9762;&#x5185;&#x90E8;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;A&#x9762;&#x662F;&#x4E0D;&#x5305;&#x542B;B&#x7EBF;&#x7684;&#x3002;</strong></p>
<h3 id="stequals"><span id="ST_Equals">ST_Equals</span></h3>
<p><strong>&#x524D;&#x63D0;&#xFF1A;&#x90FD;&#x53EA;&#x652F;&#x6301;geometry&#xFF0C;&#x4E0D;&#x652F;&#x6301;geography&#x3002;</strong></p>
<p>&#x5B9A;&#x4E49;&#xFF1A;&#x56FE;&#x5F62;A&#x4E0E;&#x56FE;&#x5F62;B&#x201C;&#x76F8;&#x7B49;&#x201D;&#xFF0C;&#x76F8;&#x7B49;&#x662F;&#x5F15;&#x53F7;&#xFF0C;<strong>&#x610F;&#x5473;&#x7740;&#x4E24;&#x4E2A;&#x56FE;&#x5F62;&#x975E;&#x5168;&#x7B49;&#xFF0C;&#x800C;&#x53EA;&#x662F;&#x62D3;&#x6251;&#x76F8;&#x7B49;</strong>&#xFF0C;&#x4ECE;&#x56FE;&#x5F62;&#x62D3;&#x6251;&#x4E0A;&#x770B;&#xFF0C;&#x5219;ST_Contains(A,B)=true&#x5E76;&#x4E14;ST_Within(A,B)=true&#xFF0C;&#x5219;ST_Equals(A,B)=true&#x3002;</p>
<p>&#x70B9;&#x7684;&#x76F8;&#x7B49;&#xFF1A;</p>
<pre class="language-"><code>select ST_Contains(A,B),ST_Within(B,A),ST_Equals(A,B) from
(SELECT ST_GeomFromText(&apos;Point(0 2)&apos;,4326) As A, ST_GeomFromText(&apos;Point(0 2)&apos;,4326) As B) as test_data;
  ST_Contains  |   ST_Within  | ST_Equals
------------------------------------------
    true       |    true      |   true
</code></pre><p>&#x7EBF;&#x7684;&#x76F8;&#x7B49;&#xFF1A;</p>
<pre class="language-"><code>select ST_Contains(A,B),ST_Within(B,A),ST_Equals(A,B) from
(SELECT ST_GeomFromText(&apos;LineString(0 0,0 5)&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 0,0 3,0 5)&apos;,4326) As B) as test_data;
  ST_Contains  |   ST_Within  | ST_Equals
------------------------------------------
    true       |    true      |   true
</code></pre><p>==&#x6CE8;&#x610F;&#xFF1A;&#x7EBF;A&#x6709;&#x4E24;&#x4E2A;&#x8282;&#x70B9;&#xFF0C;&#x7EBF;B&#x6709;&#x4E09;&#x4E2A;&#x8282;&#x70B9;&#xFF0C;&#x5982;&#x679C;&#x4ECE;&#x8282;&#x70B9;&#x6570;&#x91CF;&#x4E0D;&#x7B49;&#x6765;&#x770B;&#xFF0C;&#x5176;&#x5B9E;&#x8FD9;&#x4E24;&#x4E2A;&#x7EBF;&#x80AF;&#x5B9A;&#x662F;&#x4E0D;&#x76F8;&#x7B49;&#x7684;&#xFF0C;&#x4F46;&#x662F;&#x4ECE;&#x56FE;&#x5F62;&#x62D3;&#x6251;&#x770B;&#xFF0C;&#x6EE1;&#x8DB3;ST_Contains(A,B)=true&#x5E76;&#x4E14;ST_Within(A,B)=true&#xFF0C;&#x5219;ST_Equals(A,B)=true&#x3002;==</p>
<h3 id="stcontainsproperly"><span id="ST_ContainsProperly">ST_ContainsProperly</span></h3>
<p><strong>&#x524D;&#x63D0;&#xFF1A;&#x8BE5;&#x51FD;&#x6570;&#x53EA;&#x652F;&#x6301;geometry&#xFF0C;&#x4E0D;&#x652F;&#x6301;geography&#x3002;</strong></p>
<p>&#x4F5C;&#x7528;&#xFF1A;==ST_Contains&#x7684;&#x4E00;&#x79CD;&#x7279;&#x6B8A;&#x60C5;&#x51B5;==&#xFF0C;ST_Contains&#x8981;&#x6C42;B&#x4E0D;&#x5728;A&#x5916;&#x90E8;&#x4E14;&#x81F3;&#x5C11;&#x6709;&#x4E00;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#xFF0C;&#x800C;ST_ContainsProperly&#x5219;&#x8981;&#x6C42;B&#x4E2D;&#x6240;&#x6709;&#x70B9;&#x90FD;&#x5FC5;&#x987B;&#x5728;A&#x5185;&#x90E8;&#xFF0C;&#x800C;&#x4E0D;&#x80FD;&#x5728;A&#x7684;&#x5916;&#x90E8;&#x6216;&#x8FB9;&#x754C;&#x4E0A;&#x3002;</p>
<p>&#x6EE1;&#x8DB3;ST_Contains&#x800C;&#x4E0D;&#x6EE1;&#x8DB3;ST_ContainsProperly&#xFF1A;
<img src="http://localhost:4000/images/SpatialRelationships/ST_ContainsProperly.png" alt=""></p>
<pre class="language-"><code>select ST_Contains(A,B),ST_ContainsProperly(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 0,3 3)&apos;,4326) As B) as test_data;
  ST_Contains  |   ST_ContainsProperly
--------------------------------------
    true       |         false
</code></pre><p>&#x6EE1;&#x8DB3;&#x8DB3;ST_Contains&#x53C8;&#x6EE1;&#x8DB3;ST_ContainsProperly&#xFF1A;
<img src="http://localhost:4000/images/SpatialRelationships/ST_Contains1.png" alt=""></p>
<pre class="language-"><code>select ST_Contains(A,B),ST_ContainsProperly(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;LineString(1 1,3 3)&apos;,4326) As B) as test_data;
  ST_Contains  |   ST_ContainsProperly
--------------------------------------
    true       |         true
</code></pre><p><strong>&#x7ED3;&#x8BBA;&#xFF1A;ST_ContainsProperly(A,B)&#x5F53;B&#x54EA;&#x6015;&#x6709;&#x4E00;&#x4E2A;&#x70B9;&#x5728;A&#x7684;&#x8FB9;&#x754C;&#x4E0A;&#xFF0C;&#x4E5F;&#x4F1A;&#x8FD4;&#x56DE;false&#xFF0C;&#x800C;&#x5168;&#x90E8;&#x8282;&#x70B9;&#x90FD;&#x5728;A&#x5185;&#x90E8;&#x624D;&#x8FD4;&#x56DE;true&#x3002;</strong></p>
<h3 id="stcoversstcoveredby"><span id="ST_Covers">ST_Covers,ST_CoveredBy</span></h3>
<p><strong>&#x524D;&#x63D0;&#xFF1A;&#x90FD;&#x652F;&#x6301;geometry&#x548C;geography&#x7C7B;&#x578B;&#x3002;</strong></p>
<p>&#x4F5C;&#x7528;&#xFF1A;ST_Covers(A,B)&#x8868;&#x793A;&#x56FE;&#x5F62;&#x8986;&#x76D6;&#x5173;&#x7CFB;&#xFF0C;&#x8868;&#x8FBE;&#x56FE;&#x5F62;B&#x6CA1;&#x6709;&#x70B9;&#x5728;&#x56FE;&#x5F62;A&#x5916;&#x90E8;&#x3002;ST_CoveredBy(A,B)&#x4E0E;ST_Covers&#x76F8;&#x53CD;&#xFF0C;&#x8868;&#x8FBE;&#x56FE;&#x5F62;A&#x6CA1;&#x6709;&#x70B9;&#x5728;&#x56FE;&#x5F62;B&#x5916;&#x90E8;&#x3002;</p>
<p>&#x8BF4;&#x660E;&#xFF1A;ST_Covers&#x548C;ST_Contains&#x5728;&#x67D0;&#x4E9B;&#x60C5;&#x51B5;&#x4E0B;&#x56DE;&#x91CD;&#x53E0;&#xFF0C;&#x4F46;&#x662F;&#x4E5F;&#x6709;&#x5DEE;&#x5F02;&#x3002;</p>
<p>&#x65E2;&#x7B26;&#x5408;ST_Contains&#x4E5F;&#x7B26;&#x5408;ST_Covers&#xFF1A;
<img src="http://localhost:4000/images/SpatialRelationships/ST_ContainsProperly.png" alt=""></p>
<pre class="language-"><code>select ST_Contains(A,B),ST_Covers(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 0,3 3)&apos;,4326) As B) as test_data;
  ST_Contains  |   ST_Covers
-------------------------------
    true       |     true
</code></pre><p><strong>&#x603B;&#x7ED3;&#xFF1A;&#x6EE1;&#x8DB3;B&#x4E2D;&#x6CA1;&#x6709;&#x70B9;&#x5728;&#x56FE;&#x5F62;A&#x5916;&#x90E8;&#xFF0C;&#x6240;&#x4EE5;ST_Covers(A,B)=true&#xFF0C;&#x540C;&#x65F6;&#xFF0C;&#x53C8;&#x6EE1;&#x8DB3;B&#x4E2D;&#x81F3;&#x5C11;&#x6709;&#x4E2A;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#xFF0C;&#x6240;&#x4EE5;ST_Contains(A,B)=true&#x3002;</strong></p>
<p>&#x4E0D;&#x7B26;&#x5408;ST_Contains&#x4F46;&#x7B26;&#x5408;ST_Covers&#xFF1A;
<img src="http://localhost:4000/images/SpatialRelationships/ST_Contains3.png" alt=""></p>
<pre class="language-"><code>select ST_Contains(A,B),ST_Covers(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 0,0 5)&apos;,4326) As B) as test_data;
  ST_Contains  |   ST_Covers
-------------------------------
    false       |     true
</code></pre><p><strong>&#x603B;&#x7ED3;&#xFF1A;&#x6EE1;&#x8DB3;B&#x4E2D;&#x6CA1;&#x6709;&#x70B9;&#x5728;&#x56FE;&#x5F62;A&#x5916;&#x90E8;&#xFF0C;&#x6240;&#x4EE5;ST_Covers(A,B)=true&#xFF0C;&#x4F46;&#x662F;&#xFF0C;&#x4E0D;&#x6EE1;&#x8DB3;B&#x4E2D;&#x81F3;&#x5C11;&#x6709;&#x4E2A;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#xFF0C;&#x6240;&#x4EE5;ST_Contains(A,B)=false&#x3002;</strong></p>
<h5 id="&#x8865;&#x5145;&#x8BF4;&#x660E;">&#x8865;&#x5145;&#x8BF4;&#x660E;</h5>
<p>ST_Covers&#x652F;&#x6301;geography&#xFF1A;</p>
<pre class="language-"><code>select ST_Covers(ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326)::geography,ST_GeomFromText(&apos;LineString(0 0,0 5)&apos;,4326)::geography);
    ST_Covers
-----------------
     true
</code></pre><p>ST_Covers&#x4E0E;ST_CoveredBy&#x5173;&#x7CFB;&#x5176;&#x5B9E;&#x5F88;&#x50CF;ST_Contains&#x4E0E;St_Within&#x4E4B;&#x95F4;&#x7684;&#x5173;&#x7CFB;&#xFF1A;</p>
<pre class="language-"><code>select ST_Covers(A,B),ST_CoveredBy(B,A) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 0,0 5)&apos;,4326) As B) as test_data;
  ST_Covers  |   ST_CoveredBy
-------------------------------
    true       |     true
</code></pre><h3 id="stoverlapsstcrosses"><span id="ST_Overlaps">ST_Overlaps,ST_Crosses</span></h3>
<p><strong>&#x524D;&#x63D0;&#xFF1A;&#x4EC5;&#x4EC5;&#x652F;&#x6301;geometry&#x7C7B;&#x578B;</strong> </p>
<p>&#x5171;&#x540C;&#x70B9;&#xFF1A;ST_Overlaps(A,B),ST_Crosses(A,B)&#x90FD;&#x662F;&#x8868;&#x8FBE;B&#x4E2D;&#x6709;&#x90E8;&#x5206;&#x56FE;&#x5F62;&#x5728;A&#x5185;&#x90E8;&#xFF0C;&#x540C;&#x65F6;&#x53C8;&#x6709;&#x90E8;&#x5206;&#x56FE;&#x5F62;&#x5728;A&#x5916;&#x90E8;&#x3002;</p>
<p>&#x4E0D;&#x540C;&#x70B9;&#xFF1A;</p>
<ul>
<li>ST_Overlaps(A,B)&#xFF0C;&#x538B;&#x76D6;&#x5173;&#x7CFB;&#xFF0C;A&#xFF0C;B&#x53CA;&#x5176;&#x4E24;&#x8005;&#x7684;&#x4EA4;&#x96C6;&#x90FD;&#x8981;&#x6C42;&#x540C;&#x4E00;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#xFF0C;&#x5373;&#x5982;&#x679C;A&#x662F;&#x9762;&#xFF0C;&#x5219;B&#x4E5F;&#x8981;&#x662F;&#x9762;&#xFF0C;&#x800C;&#x4E14;&#x4EA4;&#x96C6;&#x4E5F;&#x4E00;&#x5B9A;&#x662F;&#x9762;&#x3002;</li>
<li>ST_Crosses(A,B)&#xFF0C;&#x7A7F;&#x8D8A;&#x5173;&#x7CFB;&#xFF0C;A,B&#x4E24;&#x8005;&#x7684;&#x4EA4;&#x96C6;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x5C0F;&#x4E8E;A&#xFF0C;B&#x4E2D;&#x6700;&#x5927;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x3002;&#x5373;&#x5982;&#x679C;A&#x662F;&#x9762;&#xFF0C;B&#x662F;&#x7EBF;&#xFF0C;&#x4EA4;&#x96C6;&#x662F;&#x7EBF;&#xFF0C;&#x7EBF;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x5C0F;&#x4E8E;AB&#x4E2D;&#x6700;&#x5927;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#xFF08;&#x6700;&#x5927;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x662F;A&#xFF0C;A&#x662F;&#x9762;&#xFF09;&#x3002;</li>
</ul>
<p>&#x793A;&#x4F8B;1&#xFF1A;&#x4E24;&#x4E2A;&#x9762;&#x76F8;&#x4EA4;&#xFF0C;&#x7C7B;&#x578B;&#x4E00;&#x81F4;&#xFF0C;&#x4F46;&#x662F;B&#x6CA1;&#x6709;&#x70B9;&#x5728;A&#x7684;&#x5185;&#x90E8;&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Overlaps1.png" alt=""></p>
<pre class="language-"><code>select ST_Overlaps(A,B),ST_Crosses(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, 
  ST_GeomFromText(&apos;Polygon((-1 -1,-1 1,0 1,0 -1,-1 -1))&apos;,4326) As B) as test_data;
  ST_Overlaps  |  ST_Crosses
-----------------------------
    false      |    false
</code></pre><p>&#x8BF4;&#x660E;&#xFF1A;AB&#x4E24;&#x4E2A;&#x90FD;&#x662F;&#x9762;&#xFF0C;&#x4EA4;&#x96C6;&#x662F;&#x6761;&#x7EBF;&#xFF0C;&#x4EA4;&#x96C6;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x662F;&#x7EBF;&#xFF0C;&#x4E0E;&#x8F93;&#x5165;&#x7684;AB&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x662F;&#x9762;&#x4E0D;&#x4E00;&#x81F4;&#xFF0C;&#x56E0;&#x6B64;&#x4E0D;&#x662F;&#x538B;&#x76D6;&#x5173;&#x7CFB;&#x3002;&#x53E6;&#x5916;&#xFF0C;B&#x6709;&#x90E8;&#x5206;&#x56FE;&#x5F62;&#x5728;A&#x5916;&#x90E8;&#xFF0C;&#x4F46;&#x662F;&#x6CA1;&#x6709;&#x90E8;&#x5206;&#x56FE;&#x5F62;&#x5728;A&#x7684;&#x5185;&#x90E8;&#xFF08;&#x4EC5;&#x5728;&#x8FB9;&#x754C;&#xFF09;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;&#x65E2;&#x4E0D;&#x6EE1;&#x8DB3;&#x538B;&#x76D6;&#x4E5F;&#x4E0D;&#x6EE1;&#x8DB3;&#x7A7F;&#x8D8A;&#x5173;&#x7CFB;&#x7684;&#x5B9A;&#x4E49;&#xFF0C;&#x6240;&#x4EE5;&#x7ED3;&#x679C;&#x90FD;&#x662F;false&#x3002;</p>
<p>&#x793A;&#x4F8B;2&#xFF1A;&#x4E24;&#x4E2A;&#x9762;&#x76F8;&#x4EA4;&#xFF0C;&#x7C7B;&#x578B;&#x4E00;&#x81F4;&#xFF0C;&#x4F46;&#x662F;B&#x65E2;&#x6709;&#x70B9;&#x5728;A&#x5916;&#x90E8;&#xFF0C;&#x4E5F;&#x6709;&#x70B9;&#x5728;A&#x5185;&#x90E8;&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Overlaps2.png" alt=""></p>
<pre class="language-"><code>select ST_Overlaps(A,B),ST_Crosses(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;Polygon((-1 -1,-1 3,3 3,3 -1,-1 -1))&apos;,4326) As B) as test_data;
   ST_Overlaps  |  ST_Crosses
-----------------------------
    true      |    false
</code></pre><p>&#x8BF4;&#x660E;&#xFF1A;&#x9996;&#x5148;&#xFF0C;&#x4ECE;&#x56FE;&#x5F62;&#x53EF;&#x77E5;&#xFF0C;B&#x6709;&#x90E8;&#x5206;&#x56FE;&#x5F62;&#x5728;A&#x7684;&#x5185;&#x90E8;&#xFF0C;&#x4E5F;&#x6709;&#x90E8;&#x5206;&#x56FE;&#x5F62;&#x5728;A&#x7684;&#x5916;&#x90E8;&#xFF0C;&#x56E0;&#x6B64;&#x6EE1;&#x8DB3;&#x538B;&#x76D6;&#x548C;&#x7A7F;&#x8D8A;&#x5173;&#x7CFB;&#x5B9A;&#x4E49;&#x3002;&#x7531;&#x4E8E;AB&#x90FD;&#x662F;&#x9762;&#xFF0C;&#x4EA4;&#x96C6;&#x4E5F;&#x662F;&#x9762;&#xFF0C;&#x4EA4;&#x96C6;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x4E0E;&#x8F93;&#x5165;&#x7684;AB&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x4E00;&#x81F4;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;&#x8FD9;&#x662F;&#x538B;&#x76D6;&#x5173;&#x7CFB;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x7A7F;&#x8D8A;&#x5173;&#x7CFB;&#x3002;&#xFF08;&#x7A7F;&#x8D8A;&#x5173;&#x7CFB;&#x4EA4;&#x96C6;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x5C0F;&#x4E8E;AB&#x6700;&#x5927;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#xFF0C;&#x5373;&#x4E0D;&#x80FD;&#x662F;&#x9762;&#xFF09;</p>
<p>&#x793A;&#x4F8B;3&#xFF1A;&#x4E24;&#x4E2A;&#x7EBF;&#x76F8;&#x4EA4;&#xFF0C;&#x4EA4;&#x96C6;&#x662F;&#x70B9;&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Crosses1.png" alt=""></p>
<pre class="language-"><code>select ST_Overlaps(A,B),ST_Crosses(A,B) from
(SELECT ST_GeomFromText(&apos;LineString(0 0,3 3)&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 3,3 0)&apos;,4326) As B) as test_data;
   ST_Overlaps  |  ST_Crosses
-----------------------------
    false      |    true
</code></pre><p>&#x8BF4;&#x660E;&#xFF1A;&#x4ECE;&#x56FE;&#x5F62;&#x53EF;&#x77E5;&#xFF0C;AB&#x7EBF;&#x6709;&#x4EA4;&#x96C6;&#xFF0C;&#x4EA4;&#x96C6;&#x662F;&#x70B9;&#xFF0C;&#x6EE1;&#x8DB3;B&#x6709;&#x90E8;&#x5206;&#x56FE;&#x5F62;&#x5728;A&#x7684;&#x5185;&#x90E8;&#xFF0C;&#x4E5F;&#x6709;&#x90E8;&#x5206;&#x56FE;&#x5F62;&#x5728;A&#x7684;&#x5916;&#x90E8;&#xFF0C;&#x56E0;&#x6B64;&#x6EE1;&#x8DB3;&#x538B;&#x76D6;&#x548C;&#x7A7F;&#x8D8A;&#x5173;&#x7CFB;&#x5B9A;&#x4E49;&#x3002;&#x70B9;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x4E0E;AB&#x7EBF;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#x4E0D;&#x4E00;&#x81F4;&#xFF0C;&#x4E14;&#x70B9;&#x7684;&#x7EF4;&#x5EA6;&#x5C0F;&#x4E8E;AB&#x4E2D;&#x6700;&#x5927;&#x7684;&#x51E0;&#x4F55;&#x7EF4;&#x5EA6;&#xFF08;&#x662F;&#x7EBF;&#xFF09;&#xFF0C;&#x56E0;&#x6B64;&#x662F;&#x7A7F;&#x8D8A;&#x5173;&#x7CFB;&#x800C;&#x4E0D;&#x662F;&#x538B;&#x76D6;&#x5173;&#x7CFB;&#x3002;</p>
<p>&#x793A;&#x4F8B;4&#xFF1A;&#x4E24;&#x4E2A;&#x7EBF;&#x76F8;&#x4EA4;&#xFF0C;&#x4EA4;&#x96C6;&#x662F;&#x7EBF;&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Crosses2.png" alt=""></p>
<pre class="language-"><code>select ST_Overlaps(A,B),ST_Crosses(A,B) from
(SELECT ST_GeomFromText(&apos;LineString(0 0,3 3)&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 3,1.5 1.5,1.6 1.6,2 4)&apos;,4326) As B) as test_data;
   ST_Overlaps  |  ST_Crosses
-----------------------------
    true      |    false
</code></pre><p>&#x8BF4;&#x660E;&#xFF1A;AB&#x6EE1;&#x8DB3;&#x538B;&#x76D6;&#x548C;&#x7A7F;&#x8D8A;&#x7684;&#x56FE;&#x5F62;&#x5B9A;&#x4E49;&#xFF0C;&#x4F46;&#x662F;&#x8FD4;&#x56DE;&#x7EF4;&#x5EA6;&#x4E3A;&#x7EBF;&#x4E0E;&#x8F93;&#x5165;AB&#x4E00;&#x81F4;&#xFF0C;&#x6240;&#x4EE5;&#x662F;&#x538B;&#x76D6;&#x5173;&#x7CFB;&#x800C;&#x4E0D;&#x662F;&#x7A7F;&#x8D8A;&#x5173;&#x7CFB;&#x3002;</p>
<p>&#x5E94;&#x7528;&#x573A;&#x666F;&#xFF1A;
&#x73B0;&#x6709;&#x666E;&#x901A;&#x9053;&#x8DEF;&#x8868;roads&#xFF0C;&#x9AD8;&#x901F;&#x516C;&#x8DEF;highways&#xFF0C;&#x8981;&#x6C42;&#x8FD4;&#x56DE;&#x88AB;&#x9AD8;&#x901F;&#x516C;&#x8DEF;&#x7A7F;&#x8D8A;&#x7684;&#x9053;&#x8DEF;id&#x3002;</p>
<pre class="language-"><code>--&#x4E24;&#x4E2A;&#x8868;&#x7ED3;&#x6784;
CREATE TABLE roads (
    gid serial primary key,
    geom geometry(LineString,4326)
);
create index roads_geom_idx on roads using gist(geom);

CREATE TABLE highways (
    gid serial primary key,
    geom geometry(LineString,4326)
);
create index highways_geom_idx on highways using gist(geom);

--&#x6C42;&#x7ED3;&#x679C;&#xFF1A;
select a.gid from roads a,highways b where ST_Crosses(a.geom,b.geom);
</code></pre><h3 id="sttouches"><span id="ST_Touches">ST_Touches</span></h3>
<p><strong>&#x524D;&#x63D0;&#xFF1A;&#x4EC5;&#x4EC5;&#x652F;&#x6301;geometry&#x7C7B;&#x578B;&#x3002;</strong> </p>
<p>&#x5B9A;&#x4E49;&#xFF1A;ST_Touches(A,B)&#xFF0C;&#x76F8;&#x8FDE;&#x5173;&#x7CFB;&#xFF0C;&#x5982;&#x679C;AB&#x4E4B;&#x95F4;&#x4EA4;&#x96C6;&#x4F4D;&#x4E8E;AB&#x7684;&#x8FB9;&#x754C;&#x7684;&#x5E76;&#x96C6;&#x4E2D;&#xFF0C;&#x5219;&#x8FD4;&#x56DE;TRUE&#x3002;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Touches1.png" alt=""></p>
<p>&#x5B9A;&#x4E49;&#x89E3;&#x6790;&#xFF1A;
    1 &#x81F3;&#x5C11;&#x6709;&#x4E00;&#x4E2A;&#x516C;&#x5171;&#x70B9;&#xFF0C;&#x56E0;&#x6B64;&#x5FC5;&#x987B;&#x76F8;&#x4EA4;&#x3002;
    2 &#x76F8;&#x4EA4;&#x90E8;&#x5206;&#x5728;AB&#x56FE;&#x5F62;&#x8FB9;&#x754C;&#x7684;&#x5E76;&#x96C6;&#x4E2D;&#x3002;</p>
<p>&#x793A;&#x4F8B;1&#xFF1A;&#x4E24;&#x4E2A;&#x9762;&#x8FB9;&#x754C;&#x76F8;&#x8FDE;&#xFF1A;
<img src="http://localhost:4000/images/SpatialRelationships/ST_Overlaps1.png" alt=""></p>
<pre class="language-"><code>select ST_Intersects(A,B),
    ST_Contains(
        ST_Union(ST_Boundary(A),ST_Boundary(B)),
        ST_Intersection(A,B)
    ),ST_Touches(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, 
  ST_GeomFromText(&apos;Polygon((-1 -1,-1 1,0 1,0 -1,-1 -1))&apos;,4326) As B) as test_data;

  ST_Intersects | ST_Contains | ST_Touches
-------------------------------------------
    true        |    true     |   true
</code></pre><p>&#x8BF4;&#x660E;&#xFF1A;AB&#x76F8;&#x4EA4;&#xFF0C;A&#x8FB9;&#x754C;ST_Boundary(A)&#xFF0C;B&#x8FB9;&#x754C;ST_Boundary(B)&#xFF0C;AB&#x8FB9;&#x754C;&#x5E76;&#x96C6;&#x662F;ST_Union(ST_Boundary(A),ST_Boundary(B))&#xFF0C;AB&#x4EA4;&#x96C6;&#x662F;ST_Intersection(A,B)&#xFF0C;AB&#x4EA4;&#x96C6;&#x5728;AB&#x8FB9;&#x754C;&#x7684;&#x5E76;&#x96C6;&#x4E2D;&#xFF0C;&#x5373;    ST_Contains(ST_Union(ST_Boundary(A),ST_Boundary(B)),ST_Intersection(A,B))=true&#xFF0C;&#x6240;&#x4EE5;&#xFF0C;ST_Touches=true&#x3002;</p>
<p>&#x793A;&#x4F8B;2&#xFF1A;&#x4E24;&#x4E2A;&#x7EBF;&#xFF0C;&#x4EA4;&#x96C6;&#x4E3A;&#x7EBF;&#xFF1A;
<img src="http://localhost:4000/images/SpatialRelationships/ST_Crosses2.png" alt=""></p>
<pre class="language-"><code>select ST_Intersects(A,B),
    ST_Contains(
        ST_Union(ST_Boundary(A),ST_Boundary(B)),
        ST_Intersection(A,B)
    ),ST_Touches(A,B) from
(SELECT ST_GeomFromText(&apos;LineString(0 0,3 3)&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 3,1.5 1.5,1.6 1.6,2 4)&apos;,4326) As B) as test_data;

  ST_Intersects | ST_Contains | ST_Touches
-------------------------------------------
    true        |    false    |   false
</code></pre><p>&#x8BF4;&#x660E;&#xFF1A;AB&#x76F8;&#x4EA4;&#xFF0C;&#x4EA4;&#x96C6;&#x4E0D;&#x5728;AB&#x8FB9;&#x754C;&#x7684;&#x5E76;&#x96C6;&#x4E2D;&#xFF0C;&#x56E0;&#x6B64;ST_Touches=false&#x3002;</p>
<p>&#x793A;&#x4F8B;3&#xFF1A;&#x4E24;&#x4E2A;&#x7EBF;&#xFF0C;&#x4EA4;&#x96C6;&#x4E3A;&#x70B9;&#x60C5;&#x51B5;1&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Touches2.png" alt=""></p>
<pre class="language-"><code>select ST_Intersects(A,B),
    ST_Contains(
        ST_Union(ST_Boundary(A),ST_Boundary(B)),
        ST_Intersection(A,B)
    ),ST_Touches(A,B) from
(SELECT ST_GeomFromText(&apos;LineString(0 0,3 3)&apos;,4326) As A, ST_GeomFromText(&apos;LineString(3 3,2 0)&apos;,4326) As B) as test_data;

  ST_Intersects | ST_Contains | ST_Touches
-------------------------------------------
    true        |    true     |   true
</code></pre><p>&#x793A;&#x4F8B;4&#xFF1A;&#x4E24;&#x4E2A;&#x7EBF;&#xFF0C;&#x4EA4;&#x96C6;&#x4E3A;&#x70B9;&#x60C5;&#x51B5;2&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Crosses1.png" alt=""></p>
<pre class="language-"><code>select ST_Intersects(A,B),
    ST_Contains(
        ST_Union(ST_Boundary(A),ST_Boundary(B)),
        ST_Intersection(A,B)
    ),ST_Touches(A,B) from
(SELECT ST_GeomFromText(&apos;LineString(0 0,3 3)&apos;,4326) As A, ST_GeomFromText(&apos;LineString(0 3,3 0)&apos;,4326) As B) as test_data;

  ST_Intersects | ST_Contains | ST_Touches
-------------------------------------------
    true        |    false    |   false
</code></pre><h3 id="strelate"><span id="ST_Relate">ST_Relate</span></h3>
<p><strong>&#x524D;&#x63D0;&#xFF1A;&#x4EC5;&#x4EC5;&#x652F;&#x6301;geometry&#x7C7B;&#x578B;&#x3002;</strong> </p>
<p>&#x7528;&#x6CD5;&#xFF1A;</p>
<pre class="language-"><code>boolean ST_Relate(geometry geomA, geometry geomB, text intersectionMatrixPattern);
text ST_Relate(geometry geomA, geometry geomB);
text ST_Relate(geometry geomA, geometry geomB, integer BoundaryNodeRule);
</code></pre><p>&#x4F5C;&#x7528;&#xFF1A;&#x901A;&#x8FC7;&#x6D4B;&#x8BD5;&#x4E24;&#x4E2A;&#x56FE;&#x5F62;&#x7684;interior&#xFF0C;boundary&#x548C;exterior&#x4E4B;&#x95F4;&#x7684;&#x4EA4;&#x96C6;&#x5173;&#x7CFB;&#xFF0C;&#x8FD9;&#x4E2A;&#x5173;&#x7CFB;&#x662F;&#x4E00;&#x4E2A;DE-9IM&#x6A21;&#x578B;&#xFF0C;&#x6BD4;&#x5BF9;&#x4F20;&#x5165;&#x7684;intersectionMatrixPattern&#xFF0C;&#x4E00;&#x81F4;&#x5219;&#x8FD4;&#x56DE;true&#x3002;
&#x5982;&#x679C;&#x4E0D;&#x4F20;&#x5165;intersectionMatrixPattern&#xFF0C;&#x8FD4;&#x56DE;&#x4E24;&#x4E2A;&#x56FE;&#x5F62;&#x7684;&#x6700;&#x5927;&#x7684;intersectionMatrixPattern&#x5B57;&#x7B26;&#x4E32;&#x3002;</p>
<p>&#x6982;&#x5FF5;&#xFF1A;</p>
<p>1 &#x56FE;&#x5F62;&#x7EF4;&#x5EA6;</p>
<table>
<thead>
<tr>
<th>&#x51E0;&#x4F55;&#x56FE;&#x5F62;</th>
<th>&#x7EF4;&#x5EA6;&#x7F16;&#x53F7;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x70B9;</td>
<td>0</td>
</tr>
<tr>
<td>&#x7EBF;</td>
<td>1</td>
</tr>
<tr>
<td>&#x9762;</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>2 &#x540D;&#x8BCD;&#x89E3;&#x91CA;</p>
<table>
<thead>
<tr>
<th>&#x540D;&#x8BCD;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>interior</td>
<td>&#x56FE;&#x5F62;&#x5185;&#x90E8;</td>
</tr>
<tr>
<td>boundary</td>
<td>&#x56FE;&#x5F62;&#x8FB9;&#x754C;</td>
</tr>
<tr>
<td>exterior</td>
<td>&#x56FE;&#x5F62;&#x5916;&#x90E8;</td>
</tr>
</tbody>
</table>
<p>&#x4E24;&#x4E2A;&#x538B;&#x76D6;&#x9762;(ST_Overlaps)&#x7684;9IM&#x793A;&#x4F8B;&#x56FE;&#xFF1A;
<img src="http://localhost:4000/images/SpatialRelationships/ST_Relate1.png" alt=""></p>
<p>&#x4E0A;&#x56FE;&#x5BF9;&#x5E94;&#x7684;DE-9IM&#x8868;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>DE-9IM</th>
<th>interior</th>
<th>boundary</th>
<th>exterior</th>
</tr>
</thead>
<tbody>
<tr>
<td>interior</td>
<td>2</td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>boundary</td>
<td>1</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>exterior</td>
<td>2</td>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>&#x89E3;&#x91CA;&#xFF1A;&#x89C1;&#x4E0A;&#x56FE;&#xFF0C;&#x5F53;AB&#x4E24;&#x4E2A;&#x9762;&#x662F;&#x538B;&#x76D6;&#x5173;&#x7CFB;&#xFF0C;&#x9762;&#x7684;&#x5185;&#x90E8;&#x6709;&#x4EA4;&#x96C6;&#xFF0C;&#x4EA4;&#x96C6;&#x662F;&#x4E2A;&#x9762;&#xFF0C;&#x6240;&#x4EE5;interior&#x4EA4;interior&#x7ED3;&#x679C;&#x662F;2&#xFF08;&#x9762;&#x7684;&#x7EF4;&#x5EA6;&#x7F16;&#x53F7;&#xFF09;&#xFF1B;A&#x9762;&#x5185;&#x90E8;&#x4E0E;B&#x9762;&#x8FB9;&#x754C;&#x4EA4;&#x96C6;&#x662F;&#x7EBF;&#xFF0C;&#x6240;&#x4EE5;&#x7ED3;&#x679C;&#x662F;1&#xFF08;&#x7EBF;&#x7684;&#x7EF4;&#x5EA6;&#x7F16;&#x53F7;&#xFF09;&#xFF1B;A&#x9762;&#x5185;&#x90E8;&#x4E0E;B&#x9762;&#x5916;&#x90E8;&#x4EA4;&#x96C6;&#x662F;&#x4E2A;&#x9762;&#xFF0C;&#x6240;&#x4EE5;&#x7ED3;&#x679C;&#x662F;2&#xFF1B;&#x6240;&#x4EE5;DE-9IM&#x8868;&#x7B2C;&#x4E00;&#x884C;&#x662F; 212&#xFF0C;ST_Overlaps&#x5B8C;&#x6574;&#x7684;intersectionMatrixPattern&#x5B57;&#x7B26;&#x662F;&quot;212101212&quot;&#x3002;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Overlaps2.png" alt=""></p>
<pre class="language-"><code>select ST_Relate(A,B),ST_Overlaps(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;Polygon((-1 -1,-1 3,3 3,3 -1,-1 -1))&apos;,4326) As B) as test_data;

 ST_Relate  |  ST_Overlaps
--------------------------
 212101212  |    true
</code></pre><p><strong>&#x6CE8;&#x610F;&#xFF1A;&#x5F53;&#x4EA4;&#x96C6;&#x4E3A;&#x7A7A;&#xFF0C;&#x53EF;&#x4EE5;&#x7528;&quot;F&quot;(false&#x7B80;&#x5199;)&#x4EE3;&#x6307;&#xFF1B;&#x5F53;&#x4EA4;&#x96C6;&#x4E0D;&#x4E3A;&#x7A7A;&#x5982;&#x662F;0,1,2&#x65F6;&#xFF0C;&#x53EF;&#x4EE5;&#x7528;&quot;T&quot;(true&#x7B80;&#x5199;)&#x4EE3;&#x6307;&#x3002;</strong></p>
<p><span class="pg-emphasize pg-emphasize-yellow" style="background: #ff0000;">&#x95EE;&#x9898;&#xFF1A;&#x4E3A;&#x4EC0;&#x4E48;&#x8981;&#x5F15;&#x5165;ST_Relate&#x53CA;&#x5176;DE-9IM&#xFF1F;</span></p>
<p>PostGIS&#x5DF2;&#x7ECF;&#x63D0;&#x4F9B;ST_Overlaps,ST_Crosses,ST_Contains&#x7B49;&#x5E38;&#x7528;&#x7A7A;&#x95F4;&#x5173;&#x7CFB;&#xFF08;&#x8FD9;&#x4E9B;&#x7A7A;&#x95F4;&#x5173;&#x7CFB;&#x90FD;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;ST_Relate&#x6765;&#x5B9E;&#x73B0;&#xFF09;&#xFF0C;&#x4F46;&#x662F;&#x5E76;&#x4E0D;&#x80FD;&#x5305;&#x542B;&#x5168;&#x90E8;&#x7684;&#x56FE;&#x5F62;&#x5173;&#x7CFB;&#xFF0C;&#x5BF9;&#x4E8E;&#x5B98;&#x65B9;&#x5B9A;&#x4E49;&#x51FD;&#x6570;&#x4E4B;&#x5916;&#x7684;&#x56FE;&#x5F62;&#x5173;&#x7CFB;&#xFF0C;&#x90FD;&#x4EE5;&#x901A;&#x8FC7;DE-9IM&#x53BB;&#x8868;&#x8FBE;&#x548C;&#x67E5;&#x8BE2;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;&#x5355;&#x72EC;&#x4F7F;&#x7528;ST_Relate&#x4E3B;&#x8981;&#x662F;&#x7528;&#x6765;&#x5B9E;&#x73B0;&#x66F4;&#x591A;&#x590D;&#x6742;&#x7684;&#x7A7A;&#x95F4;&#x5173;&#x7CFB;&#x3002;</p>
<p>&#x7531;&#x4E8E;&#x7EBF;&#x70B9;&#x7684;&#x5916;&#x90E8;&#x5185;&#x90E8;&#x63CF;&#x8FF0;&#x6BD4;&#x8F83;&#x62BD;&#x8C61;&#xFF0C;&#x6709;&#x65F6;&#x4E0D;&#x597D;&#x7406;&#x89E3;&#xFF0C;&#x9762;&#x6BD4;&#x8F83;&#x7B26;&#x5408;&#x4EBA;&#x7684;&#x601D;&#x7EF4;&#xFF0C;&#x4EE5;&#x4E0B;&#x90FD;&#x4EE5;&#x9762;&#x9762;&#x6765;&#x8BF4;&#x660E;&#x3002;</p>
<p>&#x793A;&#x4F8B;1&#xFF1A;&#x7528;ST_Relate&#x5B9E;&#x73B0;ST_Intersects&#x4E00;&#x6837;&#x7684;&#x67E5;&#x8BE2;&#xFF1A;</p>
<p>AB&#x4E24;&#x9762;&#x5185;&#x90E8;&#x76F8;&#x4EA4;&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Overlaps2.png" alt=""></p>
<p>&#x5F53;AB&#x4E24;&#x9762;&#x76F8;&#x4EA4;&#x662F;&#xFF0C;&#x53EA;&#x8981;&#x770B;interiorA&#x4E0E;interiorB&#x4EA4;&#x96C6;&#x5B58;&#x5728;&#xFF0C;&#x7ED3;&#x679C;&#x662F;&#x9762;&#xFF0C;&#x7EF4;&#x5EA6;&#x7F16;&#x7801;&#x662F;2&#xFF0C;&#x5373;&#x53EF;&#x6EE1;&#x8DB3;AB&#x662F;&#x76F8;&#x4EA4;&#x7684;&#xFF0C;&#x5176;&#x4ED6;&#x5173;&#x7CFB;&#x7528; <em> &#x8868;&#x793A;&#x5373;&#x53EF;&#xFF0C;&#x8868;&#x8FBE;&#x201C;&#x5BF9;&#x6B64;&#x4E24;&#x8005;&#x5173;&#x7CFB;&#x4E0D;&#x5173;&#x5FC3;&#xFF0C;&#x4E0D;&#x505A;&#x5B9A;&#x4E49;&#x201D;&#xFF0C;&#x56E0;&#x6B64;&#x4E24;&#x9762;&#x5185;&#x90E8;&#x76F8;&#x4EA4;intersectionMattrixPattern=&apos;2<strong><em>**</em></strong>&apos;&#xFF0C;&#x5728;&#x505A;&#x5173;&#x7CFB;&#x5224;&#x65AD;&#x65F6;&#x6709;&#x65F6;&#x4E0D;&#x9700;&#x8981;&#x660E;&#x786E;&#x7684;&#x7EF4;&#x5EA6;&#x7F16;&#x7801;&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x5224;&#x522B;&#x662F;&#x5426;&#x6709;&#x4EA4;&#x96C6;&#xFF0C;&#x6CA1;&#x6709;&#x5C31;&#x662F;F&#xFF0C;&#x6709;&#x4EA4;&#x96C6;&#x7684;&#x8BB0;&#x8FC7;&#x53EF;&#x80FD;&#x662F;0,1,2&#x4E4B;&#x4E00;&#xFF0C;&#x4ED6;&#x4EEC;&#x90FD;&#x53EF;&#x4EE5;&#x7528;T&#x8868;&#x793A;&#x5B58;&#x5728;&#x4EA4;&#x96C6;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;&apos;2<strong><em>**</em></strong>&apos;&#x5728;&#x9762;&#x5185;&#x90E8;&#x76F8;&#x4EA4;&#x662F;&#x4E5F;&#x53EF;&#x4EE5;&#x5199;&#x6210;&apos;T<strong><em>*</em></strong></em>&apos;&#x3002;</p>
<table>
<thead>
<tr>
<th>DE-9IM</th>
<th>interiorB</th>
<th>boundaryB</th>
<th>exteriorB</th>
</tr>
</thead>
<tbody>
<tr>
<td>interiorA</td>
<td>2</td>
<td>*</td>
<td>*</td>
</tr>
<tr>
<td>boundaryA</td>
<td>*</td>
<td>*</td>
<td>*</td>
</tr>
<tr>
<td>exteriorA</td>
<td>*</td>
<td>*</td>
<td>*</td>
</tr>
</tbody>
</table>
<pre class="language-"><code>--AB&#x4E24;&#x9762;&#x5185;&#x90E8;&#x76F8;&#x4EA4;
select ST_Relate(A,B,&apos;T********&apos;),ST_Intersects(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, ST_GeomFromText(&apos;Polygon((-1 -1,-1 3,3 3,3 -1,-1 -1))&apos;,4326) As B) as test_data;

 ST_Relate  |  ST_Overlaps
--------------------------
  true      |    true
</code></pre><p>AB&#x4E24;&#x9762;&#x8FB9;&#x754C;&#x76F8;&#x4EA4;&#xFF1A;</p>
<p><img src="http://localhost:4000/images/SpatialRelationships/ST_Overlaps1.png" alt=""></p>
<p>AB&#x4E24;&#x9762;&#x8FB9;&#x754C;&#x76F8;&#x4EA4;&#xFF0C;&#x7ED3;&#x679C;&#x662F;&#x7EBF;&#xFF0C;&#x7EF4;&#x5EA6;&#x7F16;&#x7801;&#x662F;1&#xFF0C;&#x5176;&#x4ED6;&#x5173;&#x7CFB;&#x4E0D;&#x5173;&#x5FC3;&#xFF0C;&#x5373;&#x53EF;&#x8868;&#x8FBE;&#x4E24;&#x4E2A;&#x56FE;&#x5F62;&#x662F;&#x8FB9;&#x754C;&#x76F8;&#x4EA4;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;DE-9IM&#x8868;&#x5982;&#x4E0B;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>DE-9IM</th>
<th>interiorB</th>
<th>boundaryB</th>
<th>exteriorB</th>
</tr>
</thead>
<tbody>
<tr>
<td>interiorA</td>
<td>*</td>
<td>*</td>
<td>*</td>
</tr>
<tr>
<td>boundaryA</td>
<td>*</td>
<td>1</td>
<td>*</td>
</tr>
<tr>
<td>exteriorA</td>
<td>*</td>
<td>*</td>
<td>*</td>
</tr>
</tbody>
</table>
<pre class="language-"><code>--intersectionMattrixPattern&#x4E3A;&apos;****1****&apos;&#x6216;&apos;****T****&apos;
select ST_Relate(A,B,&apos;****T****&apos;),ST_Intersects(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, 
  ST_GeomFromText(&apos;Polygon((-1 -1,-1 1,0 1,0 -1,-1 -1))&apos;,4326) As B) as test_data;

  ST_Relate  |  ST_Overlaps
--------------------------
   true      |    true
</code></pre><p>&#x793A;&#x4F8B;2&#xFF1A;&#x67E5;&#x8BE2;&#x4E24;&#x4E2A;&#x56FE;&#x5F62;&#x4E4B;&#x95F4;&#x7684;intersectionMattrixPattern&#x5177;&#x4F53;&#x7F16;&#x7801;&#xFF1A;</p>
<pre class="language-"><code>select ST_Relate(A,B),ST_Intersects(A,B) from
(SELECT ST_GeomFromText(&apos;Polygon((0 0,0 5,5 5,5 0,0 0))&apos;,4326) As A, 
  ST_GeomFromText(&apos;Polygon((-1 -1,-1 1,0 1,0 -1,-1 -1))&apos;,4326) As B) as test_data;
   ST_Relate  |  ST_Overlaps
-----------------------------
   FF2F11212  |    true
</code></pre><p><span class="pg-emphasize pg-emphasize-yellow" style="background: #ff0000;">&#x6CE8;&#x610F;&#xFF1A;ST_Relate&#x867D;&#x7136;&#x4E5F;&#x80FD;&#x5B9E;&#x73B0;St_Intersects&#x7B49;&#x51FD;&#x6570;&#xFF0C;&#x4F46;&#x662F;&#x8BE5;&#x51FD;&#x6570;&#x4E0D;&#x4F1A;&#x8D70;&#x7A7A;&#x95F4;&#x7D22;&#x5F15;&#xFF0C;&#x56E0;&#x4E3A;ST_Relate&#x91CC;&#x9762;&#x4E5F;&#x4F1A;&#x5B9E;&#x73B0;ST_Disjoint&#x8FD9;&#x6837;&#x7684;&#x76F8;&#x79BB;&#x64CD;&#x4F5C;&#xFF0C;&#x8FD9;&#x662F;&#x4E0D;&#x4F1A;&#x8D70;&#x7D22;&#x5F15;&#x7684;&#x3002;</span></p>
<h3 id="strelatematch"><span id="ST_RelateMatch">ST_RelateMatch</span></h3>
<p> <a href="#ST_Relate">ST_Relate</a></p>
<h3 id="stlinecrossingdirection"><span id="ST_LineCrossingDirection">ST_LineCrossingDirection</span></h3>
<h3 id="storderingequals"><span id="ST_OrderingEquals">ST_OrderingEquals</span></h3>
<h3 id="stpointinsidecircle"><span id="ST_PointInsideCircle">ST_PointInsideCircle</span></h3>
<h3 id="st3dintersects"><span id="ST_3DIntersects">ST_3DIntersects</span></h3>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="SpatialRelationships.html#ST_Intersects" class="navigation navigation-next navigation-unique" aria-label="Next page: ST_Disjoint">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"ST_Intersects","level":"2.1.3.1","depth":3,"next":{"title":"ST_Disjoint","level":"2.1.3.2","depth":3,"anchor":"#ST_Intersects","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Intersects","articles":[]},"previous":{"title":"8.11 空间关系","level":"2.1.3","depth":2,"ref":"","articles":[{"title":"ST_Intersects","level":"2.1.3.1","depth":3,"anchor":"#ST_Intersects","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Intersects","articles":[]},{"title":"ST_Disjoint","level":"2.1.3.2","depth":3,"anchor":"#ST_Intersects","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Intersects","articles":[]},{"title":"ST_Contains","level":"2.1.3.3","depth":3,"anchor":"#ST_Contains","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Contains","articles":[]},{"title":"ST_Within","level":"2.1.3.4","depth":3,"anchor":"#ST_Contains","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Contains","articles":[]},{"title":"ST_Equals","level":"2.1.3.5","depth":3,"anchor":"#ST_Equals","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Equals","articles":[]},{"title":"ST_ContainsProperly","level":"2.1.3.6","depth":3,"anchor":"#ST_ContainsProperly","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_ContainsProperly","articles":[]},{"title":"ST_Covers","level":"2.1.3.7","depth":3,"anchor":"#ST_Covers","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Covers","articles":[]},{"title":"ST_CoveredBy","level":"2.1.3.8","depth":3,"anchor":"#ST_Covers","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Covers","articles":[]},{"title":"ST_Overlaps","level":"2.1.3.9","depth":3,"anchor":"#ST_Overlaps","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Overlaps","articles":[]},{"title":"ST_Crosses","level":"2.1.3.10","depth":3,"anchor":"#ST_Overlaps","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Overlaps","articles":[]},{"title":"ST_Touches","level":"2.1.3.11","depth":3,"anchor":"#ST_Touches","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Touches","articles":[]},{"title":"ST_Relate","level":"2.1.3.12","depth":3,"anchor":"#ST_Relate","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_Relate","articles":[]},{"title":"ST_RelateMatch","level":"2.1.3.13","depth":3,"anchor":"#ST_RelateMatch","path":"vector_function/SpatialRelationships.md","ref":"vector_function/SpatialRelationships.md#ST_RelateMatch","articles":[]}]},"dir":"ltr"},"config":{"plugins":["pageview-count","prism","-highlight","custom-favicon","-sharing","emphasize","-lunr","-search","search-pro","graph","splitter","hide-element","folding-chapters"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-okaidia.css"]},"emphasize":{},"splitter":{},"search-pro":{},"graph":{},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"folding-chapters":{},"favicon":"../gitbook/images/favicon.ico","pageview-count":{},"custom-favicon":{},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"xxx","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"service":"http://localhost:4000"},"title":"PostGIS中文指南","gitbook":"*","description":"记录PostGIS使用入门，进阶，提高，附带API全解析"},"file":{"path":"vector_function/SpatialRelationships.md","mtime":"2024-07-23T08:43:00.325Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2024-07-23T09:36:52.257Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-folding-chapters/folding-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

